Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bearer/functions

Package Overview
Dependencies
Maintainers
4
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bearer/functions

Bearer Functions

  • 0.107.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
decreased by-90.59%
Maintainers
4
Weekly downloads
 
Created
Source

@bearer/functions

Usage

Creating a FetchData function

import { FetchData, TOAUTH2AuthContext } from '@bearer/functions'
import Client from './client'

export default class FunctionName extends FetchData implements FetchData<ReturnedData, any, TOAUTH2AuthContext> {
  // Uncomment the line above if you don't want your function to be called from the frontend
  // static backendOnly = true

  async action(event: TFetchActionEvent<Params, TOAUTH2AuthContext>): TFetchPromise<ReturnedData> {
    // const token = event.context.authAccess.accessToken
    // Put your logic here
    return { data: [] }
  }
}

export type Params = {
  // name: string
}

export type ReturnedData = {
  // foo: string[]
}

FAQs

Package last updated on 02 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc